//
// Created by ashCheng on 2022/12/19.
//
#include <iostream>
#include "Sales_item.h"

int main() {
  Sales_item temp;
  if (std::cin >> temp) {
    Sales_item item;
    int ct = 1;
    while (std::cin >> item) {
      if (temp.isbn() == item.isbn()) {
        ct++;
      }else {
        std::cout << "Sales_item's isbn " << temp.isbn() << " occurs " << ct << " times" << std::endl;
        ct = 1;
      }
      temp = item;
    }
    std::cout << "Sales_item's isbn " << temp.isbn() << " occurs " << ct << " times" << std::endl;
  }
  return 0;
}